package com.wanxi.app.service.coupon.impl;

import com.wanxi.app.service.coupon.CouponAppService;
import com.wanxi.coupon.api.feign.CouponFeignClient;
import com.wanxi.coupon.api.query.CouponUserQuery;
import com.wanxi.coupon.api.result.CommonResult;
import com.wanxi.coupon.api.vo.CouponUserTDO;
import com.wanxi.coupon.api.vo.CouponUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: CouponAppServiceImpl
 * Description:
 * date: 2022/1/12 9:35
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */
@Service
public class CouponAppServiceImpl implements CouponAppService {

    @Autowired
    private CouponFeignClient feignClient;

    @Override
    public CommonResult<List<CouponUserVo>> userFindAll(CouponUserQuery coupon) {
        return feignClient.userFindAll(coupon);
    }

    @Override
    public CommonResult userAdd(CouponUserTDO coupon) {
        return feignClient.userAdd(coupon);
    }

    @Override
    public CommonResult useCoupon(CouponUserTDO couponUserTDO) {
        return feignClient.useCoupon(couponUserTDO);
    }
}
